/*     */ package com.iris.egrant.web.struts2.tags;
/*     */ 
/*     */ import com.iris.egrant.app.utils.IrisStringUtils;
/*     */ import freemarker.template.Configuration;
/*     */ import freemarker.template.Template;
/*     */ import java.io.Writer;
/*     */ import java.util.HashMap;
/*     */ import java.util.Map;
/*     */ import javax.servlet.jsp.JspException;
/*     */ import javax.servlet.jsp.tagext.BodyTagSupport;
/*     */ import org.springframework.web.context.WebApplicationContext;
/*     */ import org.springframework.web.context.support.WebApplicationContextUtils;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class PersonSelectTag
/*     */   extends BodyTagSupport
/*     */ {
/*     */   private static final long serialVersionUID = -4383038794611667263L;
/*  21 */   private String key = "";
/*  22 */   private String fltFile = "";
/*  23 */   private String locale = "";
/*  24 */   private String bindEvent = "";
/*  25 */   private String bindObject = "";
/*  26 */   private String addRole = "";
/*  27 */   private String title = "";
/*  28 */   private String callback = "";
/*     */ 
/*     */ 
/*     */   
/*  32 */   private String psnCode = "";
/*     */ 
/*     */   
/*     */   public int doStartTag() throws JspException {
/*  36 */     WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(this.pageContext.getServletContext());
/*     */     
/*  38 */     Configuration cptFreemarkereConfiguration = (Configuration)ctx.getBean("cptFreemarkereConfiguration");
/*     */     try {
/*  40 */       String res = (String)this.pageContext.getAttribute("res");
/*  41 */       Map<String, Object> rootMap = new HashMap<String, Object>();
/*  42 */       rootMap.put("res", res);
/*  43 */       rootMap.put("key", getKey());
/*  44 */       rootMap.put("title", getTitle());
/*  45 */       rootMap.put("bindEvent", getBindEvent());
/*  46 */       rootMap.put("bindObject", getBindObject());
/*  47 */       rootMap.put("addRole", getAddRole());
/*  48 */       rootMap.put("callback", getCallback());
/*  49 */       rootMap.put("psnCode", IrisStringUtils.isNullOrBlank(this.psnCode) ? "0" : this.psnCode);
/*  50 */       Template template = cptFreemarkereConfiguration.getTemplate(getFltFile(), "utf-8");
/*     */       
/*  52 */       template.process(rootMap, (Writer)this.pageContext.getOut());
/*     */     }
/*  54 */     catch (Exception e) {
/*  55 */       throw new JspException(e);
/*     */     } 
/*     */     
/*  58 */     return 0;
/*     */   }
/*     */   
/*     */   public String getKey() {
/*  62 */     return this.key;
/*     */   }
/*     */   
/*     */   public void setKey(String key) {
/*  66 */     this.key = key;
/*     */   }
/*     */   
/*     */   public String getFltFile() {
/*  70 */     return this.fltFile;
/*     */   }
/*     */   
/*     */   public void setFltFile(String fltFile) {
/*  74 */     this.fltFile = fltFile;
/*     */   }
/*     */   
/*     */   public String getLocale() {
/*  78 */     return this.locale;
/*     */   }
/*     */   
/*     */   public void setLocale(String locale) {
/*  82 */     this.locale = locale;
/*     */   }
/*     */   
/*     */   public String getBindEvent() {
/*  86 */     return this.bindEvent;
/*     */   }
/*     */   
/*     */   public void setBindEvent(String bindEvent) {
/*  90 */     this.bindEvent = bindEvent;
/*     */   }
/*     */   
/*     */   public String getBindObject() {
/*  94 */     return this.bindObject;
/*     */   }
/*     */   
/*     */   public void setBindObject(String bindObject) {
/*  98 */     this.bindObject = bindObject;
/*     */   }
/*     */   
/*     */   public String getAddRole() {
/* 102 */     return this.addRole;
/*     */   }
/*     */   
/*     */   public void setAddRole(String addRole) {
/* 106 */     this.addRole = addRole;
/*     */   }
/*     */   
/*     */   public String getTitle() {
/* 110 */     return this.title;
/*     */   }
/*     */   
/*     */   public void setTitle(String title) {
/* 114 */     this.title = title;
/*     */   }
/*     */   
/*     */   public String getCallback() {
/* 118 */     return this.callback;
/*     */   }
/*     */   
/*     */   public void setCallback(String callback) {
/* 122 */     this.callback = callback;
/*     */   }
/*     */   
/*     */   public String getPsnCode() {
/* 126 */     return this.psnCode;
/*     */   }
/*     */   
/*     */   public void setPsnCode(String psnCode) {
/* 130 */     this.psnCode = psnCode;
/*     */   }
/*     */ }


/* Location:              D:\文件kjt\WEB-INF\lib\egrant-core-2.2.20240205.1659.jar!\com\iris\egrant\web\struts2\tags\PersonSelectTag.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       1.1.3
 */